package FirstWork;

public class Main41 {
    public static boolean isSu(int n){
        for (int i=2;i<n;i++){
            if (n%i==0){
                return false;
            }
        }
        return true;
    }

    public static void main(String[] args) {
        int count=0;
        for (int j=2;j<=1000;j++){
            if (isSu(j)) {
                count++;
                System.out.printf("%4d是素数",j);
                if (count % 10 == 0) {
                    System.out.println();
                }
            }
        }
    }
}
